package org.jeecg.modules.system.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.system.entity.CrawlSiteFeatureDoc;
import org.jeecg.modules.system.mapper.CrawlSiteFeatureDocMapper;
import org.jeecg.modules.system.service.IScrawlSiteFeatureDocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author wt
 * @Date: 2024/9/26 9:40
 * @Description:
 */
@Slf4j
@Service
public class IScrawlSiteFeatureDocServiceImpl extends ServiceImpl<CrawlSiteFeatureDocMapper, CrawlSiteFeatureDoc> implements IScrawlSiteFeatureDocService {
    @Autowired
    CrawlSiteFeatureDocMapper crawlSiteFeatureDocMapper;

    /**
     * 查询
     * @return 结果
     */
    @Override
    public Page<CrawlSiteFeatureDoc> querySiteFeatureDoc(Page<CrawlSiteFeatureDoc> page, CrawlSiteFeatureDoc crawlSiteFeatureDoc) {
        String articleName = crawlSiteFeatureDoc.getName();
        log.info("===name==="+articleName);
        log.info("===crawlSiteFeatureDoc==="+crawlSiteFeatureDoc);
        return page.setRecords(crawlSiteFeatureDocMapper.querySiteFeatureDoc(page,articleName,crawlSiteFeatureDoc));
    }

    /**
     * 新增
     * @return 结果
     */
    @Override
    public int insertCrawlSiteFeatureDoc(CrawlSiteFeatureDoc crawlSiteFeatureDoc)
    {
        return crawlSiteFeatureDocMapper.insertCrawlSiteFeatureDoc(crawlSiteFeatureDoc);
    }

    /**
     * 修改
     * @return 结果
     */
    @Override
    public boolean updateCrawlSiteFeatureDoc(CrawlSiteFeatureDoc crawlSiteFeatureDoc)
    {
        return crawlSiteFeatureDocMapper.updateCrawlSiteFeatureDoc(crawlSiteFeatureDoc);
    }


    /**
     * 删除
     * @return 结果
     */
    @Override
    public int deleteFeatureDoc(Long id) {
        return crawlSiteFeatureDocMapper.deleteFeatureDoc(id);
    }

    @Override
    public int deleteBatchFeatureDoc(Long[] ids)
    {
        return crawlSiteFeatureDocMapper.deleteBatchFeatureDoc(ids);
    }



}
